﻿Imports WiimoteLib

Module WiiController

    Public Connected As Boolean = False

    Public wm As New Wiimote()
    Public Nunchuk As WiimoteLib.NunchukState
    Public WiiButtons As WiimoteLib.ButtonState

    Public Sub TryConnect()
        Try
            wm.Connect()
            wm.SetReportType(InputReport.Status, True)
            wm.SetLEDs(False, True, True, False)
            Connected = True
        Catch ex As Exception
            Connected = False
        End Try
    End Sub

End Module
